add_library(ben_network SHARED
                       ${CMAKE_CURRENT_SOURCE_DIR}/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/access/qnetworkreply/tst_qnetworkreply.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/access/qnetworkreply_from_cache/tst_qnetworkreply_from_cache.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/socket/qtcpserver/tst_qtcpserver.cpp
)

find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Test Network)
target_link_libraries(ben_network PRIVATE Qt${QT_VERSION_MAJOR}::Core
                                         Qt${QT_VERSION_MAJOR}::CorePrivate
                                         Qt${QT_VERSION_MAJOR}::Test
                                         Qt${QT_VERSION_MAJOR}::Network
                                         Qt${QT_VERSION_MAJOR}::NetworkPrivate)